package com.wen.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wen.mapper.GatherMapper;

import com.wen.pojo.Gather;

import com.wen.pojo.dto.GatherDto;
import com.wen.pojo.vo.GatherVo;
import com.wen.service.GatherService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;
@Service
public class GatherServiceImpl extends ServiceImpl<GatherMapper, Gather> implements GatherService
{
    @Autowired
    private GatherMapper mapper;
    @Override
    public List<Gather> GatherAll() {
        List<Gather> gathers = mapper.GatherAll();
        return gathers;
    }

    @Override
    public Page<Gather> pageListGather(GatherVo gatherVo, Long pageNum, Long pageSize) {
        //创建Page对象
        Page<Gather> gatherPage = new Page<>(pageNum, pageSize);
        Page<Gather> pageListGather = mapper.pageListGather(gatherPage, gatherVo);
        return pageListGather;
    }

    @Override
    public GatherDto gathById(String id) {
        GatherDto gatherDto = mapper.gathById(id);
        return gatherDto;
    }

    @Override
    public boolean gatherByIds(String id) {
        boolean flag = mapper.gatherByIds(id);
        return flag;
    }


}
